import { Tabs, Tab, PackageManagerTabs } from '@theme';

# Quick Start

## Environment Setup

Before getting started, you need to install [Node.js](https://nodejs.org/) with version >= 20. **We recommend using Node.js 20 LTS version**.

You can check your current Node.js version with:

```bash
node -v
```

If Node.js is not installed or the version is too low, you can use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm) to install the required version.

Here's an example of installing Node.js 20 LTS with nvm:

```bash
# Install Node.js 20 LTS version
nvm install 20 --lts

# Set Node.js 20 as default
nvm alias default 20

# Switch to Node.js 20
nvm use 20
```

## Create EMP Project

You can use `create-emp` to initialize an EMP project by running:

<PackageManagerTabs command="create emp@latest" />

Follow the prompts to proceed. You can choose from these templates provided by `create-emp`:

| Template | Description                     | Features   |
| -------- | ------------------------------- | ---------- |
| react    | [React 18](https://react.dev/)  | TypeScript |
| vue3     | [Vue 3](https://vuejs.org/)     | TypeScript |
| vue2     | [Vue 2](https://v2.vuejs.org/)  | TypeScript |


## CLI Tools

The `EMP` CLI includes a lightweight command line tool with commands like dev and build.

```json title="package.json"
{
  "scripts": {
    // Start development server
    "dev": "emp dev",
    // Build for production
    "build": "emp build",
    // Preview production build locally
    "start": "emp serve",
    // Bundle size analysis
    "stat": "emp build --analyze",
  }
}
```

Refer to [CLI Tools] for all available commands and options.

## Entry Module

By default, `EMP` CLI uses `src/index.(js|ts|jsx|tsx)` as the entry module. You can modify the entry module using the [entry] configuration option.
